package com.example.comsys.service;

import com.example.comsys.model.Employee;
import com.example.comsys.param.EmployeeQueryParam;
import java.util.List;

/**
 * 定义雇员查询服务接口
 *
 * @author wjh
 * @date 2019/12/30, 周一
 */
public interface EmployeeService extends PageQueryService<Employee, EmployeeQueryParam>, ExcelService {

  /**
   * 添加一个雇员
   *
   * @param employee model
   * @return employee
   */
  Employee addEmployee(Employee employee);

  /**
   * 根据雇员id查询一个雇员的信息
   *
   * @param employeeId employee id
   * @return {@link Employee}
   */
  Employee queryEmployeeByEmployeeId(long employeeId);

  // /**
  //  * 根据参数查询雇员
  //  *
  //  * @param param 查询参数 {@link EmployeeQueryParam}
  //  * @return employee collection
  //  */
  // Page<List<Employee>> queryEmployeeByParam(EmployeeQueryParam param);

  /**
   * query all employee in specified department
   *
   * @param departmentId department id
   * @return all employees in specified department
   */
  List<Employee> queryEmployeeByDepartment(long departmentId);


  /**
   * update employee info
   *
   * @param employee updated employee , employeeId is necessary
   * @return updated employee information
   */
  Employee updateEmployeeByEmployeeId(Employee employee);

  /**
   * delete a employee from db
   *
   * @param employeeId employee id
   * @return weather
   */
  boolean deleteEmployee(long employeeId);

}
